CHAPTER III.
FERMAT'S AND WILSON'S THEOREMS, GENERALIZATIONS AND
CONVERSES; SYMMETRIC FUNCTIONS OF
1,2.....P-1 MODULO?.
FEKMAT'S AND WILSON'S THEOREMS; IMMEDIATE GENERALIZATIONS.
The Chinese1 seem to have known as early as 500 B. C. that 2P—2 is divisible by the prime p. This fact was rediscovered by P. de Fermat2 while investigating perfect numbers. Shortly afterwards, Fermat3 stated that he had a proof of the more general fact now known as Fermat's theorem: If p is any prime and x is any integer not divisible by p, then xv~l — 1 is divisible by p.
G. W. Leibniz4 (1646-1716) left a manuscript giving a proof of Fermat's theorem. Let p be a prime and set x=a-f6+c+.... Then each multi-nominal coefficient appearing in the expansion of xp— So* is divisible by p. Take a=6=c=...=l. Thus xv—x is divisible by p for every integer x.
G. Vacca6 called attention to this proof by Leibniz.
Vacca6 cited manuscripts of Leibniz in the Hannover Library showing that he proved Fermat's theorem before 1683 and that he knew the theorem now known as Wilson's17 theorem: If p is a prime, l-Hp—l)! is divisible by p. But Vacca did not explain an apparent obscurity in Leibniz's statement [cf. Mahnke7].
D. Mahnke7 gave an extensive account of those results in the manuscripts of Leibniz in the Hannover Library which relate to Fermat's and Wilson's theorems. As early as January 1676 (p. 41) Leibniz concluded, from the expressions for the yth triangular and yth pyramidal numbers, that
(y+l)y=-y*-y==Q (mod 2), (y+2)(y+l)y=y*-y=Q (mod 3),
and similarly for moduli 5 and 7, whereas the corresponding formula for modulus 9 fails for y - 2,—thusforestalling the general formula by Lagrange.18 On September 12, 1680 (p. 49), Leibniz gave the formula now known as Newton's formula for the sum of like powers and noted (by incomplete induction) that all the coefficients except the first are divisible by the exponent p, when p is a prime, so that
ap+bp+c*+.. . = (a+6+c+...)* (mod p).
Taking a = 5= ... =1, we obtain Fermat's theorem as above.4 That the binomial coefficients in (l-fl)p — 1 — 1 are divisible by the prime p was
*G. Peano, Formulaire math., 3, Turin, 1901, p. 96. Jeans.*20
'Oeuvres de Fermat, Paris, 2, 1894, p. 198, 2°, letter to Mersenne, June (?), 1640; also p. 203,
2; p. 209.
•Oeuvres, 2, 209, letter to Frenicle de Bessy, Oct. 18,1640; Opera Math., Tolosae, 1679, 163. *Leibnizens Math. Schriften, herausgegeben von G. J. Gerhardt, VII, 1863, 180-1, "nova
algebrae promotio." •Bibliotheca math., (2), 8, 1894, 46-8. •Bolletino di Bibliografia Storia Sc. Mat., 2, 1899, 113-6. 'Bibliotheca math., (3), 13, 1912-3, 29-61.